<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>v-if</title>
		<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
	</head>
	<body>
		<div id="app">
			<input type="button" value="v-if切换显示"  @click="toggleIsShow"/>
			<p v-if="isShow">小浩程序员   v-if</p>
			<p v-show="isShow"> 小浩程序员 v-show</p>
			<h2 v-if="temperature>=35">太热了</h2>
		</div>
		
		<script type="text/javascript">
			var app = new Vue({
				el: "#app",
				data:{
					isShow:false,
					temperature:200
				},
				methods:{
					toggleIsShow:function(){
						this.isShow = !this.isShow
					}
					
				}
			})
		</script>
	</body>
</html>
